package com.toycloud.business.dto.results;


import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.toycloud.common.excel.converter.DateListConverter;
import com.toycloud.common.excel.converter.ListToStringConverter;
import com.toycloud.common.excel.converter.ReadConverter;
import com.toycloud.common.excel.converter.feedTypeConverter;
import com.toycloud.system.domain.dto.FeedbackUserLabelRecordDTO;
import com.toycloud.system.domain.feedback.FeedbackConfig;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author xqyang5
 * @Date 2024/9/18 18:10
 */
@Accessors(chain = true)
@Data
@ExcelIgnoreUnannotated
public class FeedbackRecordResultVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @ExcelProperty(value = "id")
    private Long id;
    private List<FeedbackConfig> feedbackConfigList = new ArrayList<>();
    @ExcelProperty(value = "产品品牌")
    private String brand;
    @ExcelProperty(value = "产品品类")
    private String category;
    @ExcelProperty(value = "产品型号")
    private String product;
    @ExcelProperty(value = "反馈阶段")
    private String step;
    @ExcelProperty(value = "反馈来源")
    private String resource;
    @ExcelProperty(value = "一级标签", converter = ListToStringConverter.class)
    private List<String> firstLevelLabel;
    @ExcelProperty(value = "二级标签", converter = ListToStringConverter.class)
    private List<String> secondLevelLabel;
    @ExcelProperty(value = "三级标签", converter = ListToStringConverter.class)
    private List<String> threeLevelLabel;

    private List<FeedbackUserLabelRecordDTO> userLabels = new ArrayList<>();

    @ExcelProperty(value = "用户态度", converter = ListToStringConverter.class)
    private List<String> userAttitude;
    @ExcelProperty(value = "问题分类", converter = ListToStringConverter.class)
    private List<String> problemeId;
    @ExcelProperty(value = "备注", converter = ListToStringConverter.class)
    private List<String> comment;
    @ExcelProperty(value = "onesId", converter = ListToStringConverter.class)
    private List<String> onesId;
    @ExcelProperty(value = "工单状态", converter = ListToStringConverter.class)
    private List<String> ticketStatusName;
    @ExcelProperty(value = "工单时间",converter = DateListConverter.class)
    private List<Date> ticketTime;

    //    private List<CascaderLabelResult.Label1> cascaderLabels = new ArrayList<>();
    private List<Object> cascaderLabels = new ArrayList<>();
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> fileList;
    @ExcelProperty(value = "反馈内容")
    private String feedbackContent;
    @ExcelProperty(value = "反馈量")
    private Integer consultCount;
    @ExcelProperty(value = "点赞量")
    private Integer likeCount;
    @ExcelProperty(value = "浏览量")
    private Integer viewCount;
    @ExcelProperty(value = "阅读标记",converter = ReadConverter.class)
    private String readMark;
    @ExcelProperty(value = "反馈人")
    private String feedbackUser;
    @ExcelProperty(value = "反馈时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate feedbackTime;
    @ExcelProperty(value = "反馈类型",converter = feedTypeConverter.class)
    private String feedbackType;
    @ExcelProperty(value = "关联原文")
    private String originalContent;
    @ExcelProperty(value = "原文时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate originalContentTime;
    @ExcelProperty(value = "记录人")
    private String recorder;
    @ExcelProperty(value = "记录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ExcelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private long prevId = 0;
    private long nextId = 0;

}
